[CLI] Basic Command Line Shortcuts

기본 커맨드라인 단축키를 알아보자.

  • ls : list
  • cd : change directory

    • finder에서 path 끌어오는 팁!

      터미널에 cd 입력한 상태로 finder에서 원하는 dir 드래그해서 터미널에 드랍하면 전체 path 자동 입력됨

    • cd .. : parent dir로 cd
  • up / down arrow : browse previously used commands
  • clear : clear screen
  • control + U : clear line (현재 타이핑 중인 라인)

  • 커서 이동 shortcuts

    • option + click : 원하는 곳으로 커서 이동
    • control + A : 라인 제일 앞으로
    • control + E : 라인 제일 뒤로

  • 디렉토리 & 파일 management

    • mkdir : make directory
    • touch : make file
    • open : open file

      • open -a [APP NAME] : 해당 app으로 open file
    • rm : remove file
    • rm * : 디렉토리 안에서 사용 시 그 안의 모든 파일 삭제
    • rm -r : remove folder & child components



Reference

0nn0/terminal-mac-cheatsheet

https://www.learnenough.com/command-line-tutorial/basics




ABOUT ME
I write codes and words.
제가 궁금하다면 ABOUT ME 버튼을 눌러보세요!

GitHubLinkedIn